from src.email.email163 import run_email_service
from src.config.config import app_config
from src.util.log import log
from src.dingding.dingding import run_dingding_service


def run_task():
    try:
        if not app_config.check():
            log("配置文件没有检查通过")
            return
        run_email_service()
        run_dingding_service()
    except Exception as e:
        log(e)


if __name__ == '__main__':
    run_task()
